

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>replicate command &mdash; LIGGGHTS v3.X documentation</title>
  

  
  
  
  

  

  
  
    

  

  
  
    <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  

  

  
    <link rel="top" title="LIGGGHTS v3.X documentation" href="index.html"/> 

  
  <script src="_static/js/modernizr.min.js"></script>

</head>

<body class="wy-body-for-nav" role="document">

   
  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search">
          

          
            <a href="Manual.html" class="icon icon-home"> LIGGGHTS
          

          
          </a>

          
            
            
              <div class="version">
                v3.X
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul>
<li class="toctree-l1"><a class="reference internal" href="Section_intro.html">1. Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_start.html">2. Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_input_script.html">3. Input Script</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_commands.html">4. Commands</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_gran_models.html">5. Contact models</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_mesh_modules.html">6. Mesh modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_packages.html">7. Packages</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_howto.html">8. How-to discussions</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_modify.html">9. Modifying &amp; extending LIGGGHTS(R)-PUBLIC</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_python.html">10. Python interface to LIGGGHTS(R)-PUBLIC</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_errors.html">11. Errors</a></li>
</ul>

            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="Manual.html">LIGGGHTS</a>
        
      </nav>


      
      <div class="wy-nav-content">
        <div class="rst-content">
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="Manual.html">Docs</a> &raquo;</li>
        
      <li>replicate command</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="_sources/replicate.txt" rel="nofollow"> View page source</a>
          
          <a href="http://www.cfdem.com"> Website</a>
          
            <a href="Section_commands.html#comm" rel="nofollow"> Commands</a>
            
          
        
      </li>
    
  </ul>

  
  <hr/>
  
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="replicate-command">
<span id="index-0"></span><h1>replicate command<a class="headerlink" href="#replicate-command" title="Permalink to this headline">¶</a></h1>
<div class="section" id="syntax">
<h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>replicate nx ny nz offset ox oy oz shift sx sy sz
</pre></div>
</div>
<ul class="simple">
<li>nx,ny,nz = replication factors (integers) in each dimension</li>
<li><em>offset</em> ox oy oz: required keyword with values</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>ox, oy, oz = offset of each replication in box units
</pre></div>
</div>
<ul class="simple">
<li><em>shift</em> sx sy sz: optional keyword with values</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>sx, sy, sz = shift all particles by these values in box units
</pre></div>
</div>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>replicate 2 3 2 offset 1.0 1.0 2.0
replicate 1 2 2 offset 2.0 2.0 2.0 shift -0.1 0.2 0.0
</pre></div>
</div>
</div>
<div class="section" id="description">
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>Replicate the current simulation one or more times in each dimension.  For
example, replication factors of 2,2,2 will create a simulation with 8x as many
atoms by doubling the simulation domain in each dimension.  A replication factor
of 1 in a dimension leaves the simulation domain unchanged. The <em>offset</em> keyword
determines the offset between the original and replicated simulations. In
general this should be chosen according to the size of the initial periodic box.</p>
<p>All properties of the atoms are replicated, including their velocities, which
may or may not be desirable.  New atom IDs are assigned to new atoms, as are
molecule IDs.  Bonds and other topology interactions are created between pairs
of new atoms as well as between old and new atoms.  This is done by using the
image flag for each atom to &#8220;unwrap&#8221; it out of the periodic box before
replicating it.</p>
<p>This means that any molecular bond you specify in the original data file that
crosses a periodic boundary should be between two atoms with image flags that
differ by 1.  This will allow the bond to be unwrapped appropriately.</p>
<p>The <em>shift</em> keyword allows to shift the entire simulation by a specified vector.</p>
</div>
<div class="section" id="restrictions">
<h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
<p>A 2d simulation cannot be replicated in the z dimension.</p>
<p>If a simulation is non-periodic in a dimension, care should be used
when replicating it in that dimension, as it may put atoms nearly on
top of each other.</p>
<p>If the current simulation was read in from a restart file (before a
run is performed), there can have been no fix information stored in
the file for individual atoms.  Similarly, no fixes can be defined at
the time the replicate command is used that require vectors of atom
information to be stored.  This is because the replicate command does
not know how to replicate that information for new atoms it creates.</p>
<p>Replicating a system that has rigid bodies (defined via the <a class="reference internal" href="fix_rigid.html"><em>fix rigid</em></a> command), either currently defined or that
created the restart file which was read in before replicating, can
cause problems if there is a bond between a pair of rigid bodies that
straddle a periodic boundary.  This is because the periodic image
information for particles in the rigid bodies are set differently than
for a non-rigid system and can result in a new bond being created that
spans the periodic box.  Thus you cannot use the replicate command in
this scenario.</p>
<p><strong>Related commands:</strong> none</p>
<p><strong>Default:</strong> none</p>
</div>
</div>


           </div>
           <div class="articleComments">
            
           </div>
          </div>
          <footer>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2016, DCS Computing GmbH, JKU Linz and Sandia Corporation.

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  

    <script type="text/javascript">
        var DOCUMENTATION_OPTIONS = {
            URL_ROOT:'./',
            VERSION:'v3.X',
            LANGUAGE:'None',
            COLLAPSE_INDEX:false,
            FILE_SUFFIX:'.html',
            HAS_SOURCE:  true,
            SOURCELINK_SUFFIX: ''
        };
    </script>
      <script type="text/javascript" src="_static/jquery.js"></script>
      <script type="text/javascript" src="_static/underscore.js"></script>
      <script type="text/javascript" src="_static/doctools.js"></script>

  

  
  
    <script type="text/javascript" src="_static/js/theme.js"></script>
  

  
  
  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.StickyNav.enable();
      });
  </script>
   

</body>
</html>